﻿<Window x:Class="yaTDL.SyncConflictDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:yatdlcore="clr-namespace:yaTDL.Core;assembly=yaTDL.Core"
    xmlns:converters="clr-namespace:yaTDL.Core.Converters;assembly=yaTDL.Core"
    Title="{Binding Path=DialogTitle}" WindowStyle="None" ShowInTaskbar="False"  OverridesDefaultStyle="True" Style="{DynamicResource DialogWindowSytle}" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="296" Width="549">
    
	<Window.Resources>
        <converters:BoolVisibilityConverter x:Key="boolVisibilityConverter" />
        <converters:InverseBooleanConverter x:Key="inverseBooleanConverter" />
    </Window.Resources>
	
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0">
        <Button Height="20" FontSize="10" HorizontalAlignment="Right" Margin="0,0,8,8" VerticalAlignment="Bottom" Width="75" Command="{Binding Path=SelectCommand}">Select</Button>
        <TextBlock Height="28" Margin="8,46,8,0" VerticalAlignment="Top">TextBlock</TextBlock>
        <Grid Height="43" Margin="12,102,12,0" VerticalAlignment="Top" Visibility="Hidden">
            <Separator Height="11" Margin="0,-5.332,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch"/>
        </Grid>
        <TextBlock Margin="8,4,8,0" TextWrapping="Wrap" Height="42" VerticalAlignment="Top"><Run Language="en-us" Text="yaTDL has found that an item has been edited both locally and elsewhere."/><LineBreak/><Run Language="en-us" Text="Please select which version of the itme you would like to be kept."/><LineBreak/><Run Language="en-us"/></TextBlock>

        <!--ListView for displaying Tasks-->
        <ListView Margin="8,74,8,41" Visibility="{Binding Path=ItemTypeIsTask, Converter={StaticResource boolVisibilityConverter}}" ItemsSource="{Binding Path=Items}" SelectedItem="{Binding Path=SelectedItem, UpdateSourceTrigger=PropertyChanged}">
            <ListView.View>                
                <GridView>
                    <GridViewColumn Header="Content" DisplayMemberBinding="{Binding Path=Content}"/>
                    <GridViewColumn Header="DueDate" DisplayMemberBinding="{Binding Path=DueDate}"/>
                    <GridViewColumn Header="Priority" DisplayMemberBinding="{Binding Path=Priority}"/>
                    <GridViewColumn Header="Completed" DisplayMemberBinding="{Binding Path=InHistory}"/>
                    <GridViewColumn Header="Project" DisplayMemberBinding="{Binding Path=ProjectId}"/>
                </GridView>
            </ListView.View>
        </ListView>

        <!--ListView for displaying Projects-->
        <ListView Margin="8,74,8,41" ItemsSource="{Binding Path=Items}" Visibility="{Binding Path=ItemTypeIsProject, Converter={StaticResource boolVisibilityConverter}}" SelectedItem="{Binding Path=SelectedItem, UpdateSourceTrigger=PropertyChanged}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Name" Width="Auto" DisplayMemberBinding="{Binding Path=Name}"/>
                    <GridViewColumn Header="LastEdited" DisplayMemberBinding="{Binding Path=LastEdited}"/>
                </GridView>
            </ListView.View>
        </ListView>

    </Grid>
</Window>
